hi this is debrupa nandi today is my second day with git
observational - 1. collect data in a way that does not directly interfere with how the data arise(“observe”) 2. only establish an association 3. retrospective uses past data 4. prospective - data are collected throughout the study
experiment- randomly assign subjects to treatments
Confounding variables - extraneous variables that affect both the explanatory and the response variable and that make it seem like there is a relationship between them
Correlation does not imply causation Observational staements help make us make correlation statements Experiments help us infer causation
library(dplyr)
library(ggplot2)
library(statsr)
data(arbuthnot)
View(arbuthnot)
library(dplyr)
library(ggplot2)
library(statsr)
data(present)
View(present)
present <- present %>%
mutate(total = boys + girls)
prop_boys <- present$boys/present$total
present <- present %>%
mutate(prop_boys)
ggplot(data = present, aes(x = year, y = prop_boys)) +
geom_line() + geom_point() + geom_smooth()
present <- present %>%
mutate(more_boys = present$boys > present$girls)
View(present)
present <- present %>%
mutate(prop_boy_girl = boys / girls)
View(present)
ggplot(data = present, aes(x = year, y = prop_boy_girl)) +
geom_line() + geom_point() + geom_smooth()
present <- present %>%
arrange(desc(total))